import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import { SHA256 } from 'crypto-js'
import App from './App'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import VueEch from 'vue-echarts3'

import router from './router'
import store from './store'
import filters from './util/filters'

Vue.config.productionTip = false

Vue.use(ElementUI)
Vue.use(VueEch)
Vue.prototype.solt = (str = '') => {
  return SHA256(str).toString()
}

console.log(filters)
Object.keys(filters).forEach((item) => {
  Vue.filter(item, filters[item])
})
sync(store, router)

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
})
